<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/pages/common/header.jsp"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>Traders Information</title>
	</head>
	<body class="mainbody" onload="msgDisplay('${param.message}');">
		<c:set var="tradersList" value="${requestScope.tradersList}"/>
		<div class="mainContainer">
			<p class="spacerTopTen"></p>
			<p class="spacerTopTen"></p>
			<section class="bodyContainer">
				<div id="allTraders" class="productReport  hideClass">
        			<h2 class="titleTxtBig">All Traders Information</h2>
            		<p class="hrlineBr"></p>

        			<div class="productDtls"> 
        				<p class="spacerTopTen"></p>
         				<div class="divclear">
         					<table cellpadding="0" cellspacing="0" border="0" class="display reportTable" id="traderInfo" style="width:961px">
								<thead>
									<tr>
										<th>Sr.No.</th>
										<th>Name</th>
										<th>Address</th>
										<th>Contact No</th>
										<th>Email Id,Pan No.</th>
										<th>Bank Info</th>
										<th>Date</th>
										<th>Action</th>
									</tr>
								</thead>
								<tbody>
									<c:choose>
										<c:when test="${empty tradersList}">
											<tr>
												<td colspan="7"> No Traders Available</td>
											</tr>
											
										</c:when>
										<c:otherwise>
											<c:forEach var="traders" items="${tradersList}" varStatus="counter">
												<tr>
												    <td>${counter.count}</td>
													<td>${traders.companyName}</td>
													<td>${traders.address}</td>
													<td>${traders.contactNo}<br>${traders.mobileNo}</td>
													<td>${traders.emailId}<br>${traders.panNo}</td>
													<td>${traders.bankName} <br>${traders.accountNo}<br>${traders.ifscCode},${traders.micrCode}</td>
													<td>${traders.createDate}</td>
													<td>
														<a href="${context}/traderEntry?ACTION=ET&companyId=${traders.companyId}"><img src="${imageContext}/edit.gif"></a>
														<a onclick="return confirmation();" href="${context}/tradersInfo?ACTION=DT&companyId=${traders.companyId}"><img src="${imageContext}/delete.gif"></a>
													</td>
												</tr>
											</c:forEach>
										</c:otherwise>
									</c:choose>
										
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</section>
		</div>
		<jsp:include page="/pages/common/footer.jsp" />
	</body>
</html>